package com.example.test.advice.第四章_字符串.建议50_使用packageinfo类为包服务;

import java.lang.annotation.Annotation;

public class Client {

    public static void main(String[] args) {
        String pkgName = "com.example.test.advice.建议50_使用packageinfo类为包服务";
        Package pkg = Package.getPackage(pkgName);
        Annotation[] annotations = pkg.getAnnotations();
        for (Annotation an:annotations){
            if(an instanceof PkgAnnotation){
                System.out.println("Hello");
            }
        }
    }
}
